import React, { Component } from 'react'
import HomeProduct from './product.js' 
import Detail from './detail.js' 
import Addupdate  from './add-update.js'

import {Switch,Route,Redirect} from 'react-router-dom'

export class Goods extends Component {
    render() {
        return (
            <div>
               <Switch>
                   <Route path='/goods' exact component={HomeProduct} />
                   <Route path='/goods/detail' component={Detail} />
                   <Route path='/goods/addupdate' component={Addupdate} />
                   <Redirect to='/goods' />
               </Switch>
            </div>
        )
    }
}

export default Goods